package com.java.al.math;

public class DiGui {
	int sum = 1;
	
	/**
	 * 求阶乘
	 * @param b		基数
	 */
	public int jieCheng(int b){
		if (b==0) {
			return sum;
		}
		sum *=b;
		b--;
		return jieCheng(b);
	}
	public static void main(String[] args) {
		DiGui bg = new DiGui();
		System.out.println(bg.jieCheng(10));
	}
}
